package com.koron.css2.workflow;

import com.koron.css2.ServerInterface;
import com.koron.css2.serviceManage.bean.RequestBean;
import com.koron.css2.serviceManage.bean.UserInfoBean;
import com.koron.util.Constant;
import org.koron.ebs.mybatis.SessionFactory;
import org.swan.bean.MessageBean;

public class ProcessSecret implements ServerInterface{

	@Override
	public MessageBean<?> exec(SessionFactory factory, UserInfoBean userInfo, RequestBean req) {
		MessageBean<String>  info = MessageBean.create(Constant.MESSAGE_INT_SUCCESS, "success", String.class);
		try {
			info.setData(WorkflowImpl.getSecret());
		}catch(Exception ex) { 
			info.setCode(Constant.MESSAGE_DBFAIL);
			info.setDescription("获取秘钥信息失败");
		}
		return info;
	}

}
